package com.mida.app.knw.service;

import com.mida.dms.knw.entity.KnwCompositeInstance;
import com.mida.dms.knw.vo.KnwCompositeInstanceVo;
import com.mida.dms.knw.vo.PageResultVo;
import com.mida.tool.common.result.ActionResult;
import com.mida.tool.common.result.ListResult;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * KnwCompositeInstanceService
 */
public interface KnwCompositeInstanceService {

    /**
     * 保存复合实例
     * @param knwCompositeInstanceVo
     * @throws Exception
     */
    ActionResult add(KnwCompositeInstanceVo knwCompositeInstanceVo);


    /**
     * 更新复合实例
     * @param knwCompositeInstanceVo
     * @throws Exception
     */
    ActionResult update(KnwCompositeInstanceVo knwCompositeInstanceVo);

    /**
     * 删除复合实例
     * @param knwCompositeInstanceVo
     * @throws Exception
     */
    ActionResult delete(KnwCompositeInstanceVo knwCompositeInstanceVo);

    /**
     * 分页查询
     * @param knwCompositeInstanceVo
     * @return
     */
    ListResult<PageResultVo<KnwCompositeInstanceVo>> getKnwCompositeInstancePage(KnwCompositeInstanceVo knwCompositeInstanceVo);

    /**
     * 常用语批量上传处理
     * @param file
     * @return
     */
    ActionResult uploadFile(MultipartFile file) throws Exception;

    /**
     * 常用语模板下载处理
     * @return
     * @throws Exception
     */
    ActionResult downloadFile(HttpServletResponse res);
}
